<?php $atr=array(
					"name"=>"labStaff",
					"onsubmit"=>"return checkLabStaff()"
				  ); 
echo form_open('labStaff/insert',$atr); ?> 
  
<?php $bar="LabStaff List";?>
<table id="box-table-a" cellspacing="1" align="right" width="900px">
 	<tr><td colspan=7 align=right class=bar><?php echo $bar;?></td></tr>
   		<tr>
   			<th>LabStaff_ID</th>
   			<th>Staff_ID</th>
   			<th>Lab_ID</th>
   			<th>Worklevel</th>
   			<th>BasicSalary</th>   			 
   			<th>Action</th>  			
   		</tr> 		
 		
<?php if (isset($result)){?>
   	
   		<?php foreach ($result as $row):?> 
		<tr>
			<?php //$this->session->set_userdata('Customer_ID', $row->Customer_ID);?>			
			<td class="row1"><?php echo $row->LabStaff_ID; ?> </td>
			<td class="row1"><?php echo $row->Staff_ID; ?> </td>
			<td class="row1"><?php echo $row->Lab_ID ;?> </td>
			<td class="row1"><?php echo $row->Worklevel ;?> </td>
			<td class="row1"><?php echo $row->BasicSalary;?> </td>			
			<td class="row1" align="center">
				 <?php echo '<id=a>'.anchor("labStaff/edit/$row->LabStaff_ID",'<img src ="'.base_url().'templates/images/icons/edit.gif" title="Click here to modify"/>').'</a>';?>
				 <?php echo '<id=a  onclick="return checkLink();">'.anchor("labStaff/delete/$row->LabStaff_ID",'<img src ="'.base_url().'templates/images/icons/delete.png" title="Click here to delete"/>').'</a>';?> 
			</td>			
		</tr>	   
 		<?php endforeach; ?>				
   		<tr>   			
   			<td><input type="text" name ="LabStaff_ID" class="work" readonly="readonly" size="15"/></td>
   			<td><?php echo form_dropdown('Staff_ID', $staff, 'large');?></td>
   			<td><?php echo form_dropdown('Lab_ID', $lab, 'large');?></td>
   			<td><input type="text" name ="Worklevel" size="5" class="work"/></td>
   			<td><input type="text" name ="BasicSalary" size="15" onkeyup="this.value=add_commas(this.value);"/></td>   			   		    			
   			<td align="center"><input type="submit" id="submit" value="insert"/> </td>
   		</tr>
   		<tr>
   			<td colspan="6">	<?php echo $this->pagination->create_links(); // tạo link phân trang?>  </td>
   		</tr>
   		<tr>
   			<td colspan="6" id="abc"> 
   				<?php if (isset($error)){
					echo "<br/>";   			
			   		echo $error;					
					form_close();
		   		}?>
		   		
		   	 </td>
   		</tr>
		
 </table>   			
      	
 <?php }?>


